<!DOCTYPE html>
<html>
<head>
<title>${context.getContextName()}</title>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
${Styles.src(zhiqim.css)}
${Scripts.src(zhiqim.js)}
${Scripts.setContextPath(context)}
${Styles.src(zmr_theme.css)}
${Scripts.src(zmr_theme.js)}
${Scripts.src(zhiqim_iframenav.js)}
${Styles.htmlOverflowHidden()}
${zhiqim_manager_console_log()}
<script>
Z.onload(Zmr.calcMainbodyHeight);
Z(window).resize(Zmr.calcMainbodyHeight);
Z(window).resize(Zin.setTranslateForShowActive);

<#if !sessionUser.isWelcomeUrl()>
Z.onload(function()
{
    var $elem = Z("#sidebar [data-url]");
    if ($elem.length > 0)
    {//用于在浏览器上点刷新回到当前打开的页面
        Zin.doClickChildMenu($elem[0], $elem.attr("data-url"));
    }
});
</#if>
</script>
</head>

<body>
<!--顶部导航 -->
<div class="topnav">
    <div id="logo" class="logo z-pointer z-text-left" onclick="Zin.selectIframeTab('menu_index');">${context.getAttribute("name")}</div>
    <div class="topnavleft" id="sidebar">
<#var topMenuCode = sessionUser.getSelectedTopMenuCodeOrFirstMenuCode(request, designatedPath)/>
<#var childMenuCode = sessionUser.getSelectedSecondMenuCode(request, designatedPath)/>
<#for topMenu : sessionUser.getTopMenuList()>
<#if sessionUser.hasChildMenu(topMenu.getMenuCode())>
        <div class="dropdown nav">#{topMenu.getMenuName()}<i class="z-float-right z-font z-arrowhead-down z-px10"></i>
        <ul id="${topMenu.getMenuCode()}" class="subnav">
            <#for childMenu : sessionUser.getChildMenuList(topMenu.getMenuCode())>
            <li class="z-relative<#if context.getRootPath(childMenu.getMenuUrl()) == sessionUser.getMainUrl()> active</#if>" onclick="Zin.doClickChildMenu(this, '${context.getRootPath(childMenu.getMenuUrl())}');" <#if context.getRootPath(childMenu.getMenuUrl()) == sessionUser.getMainUrl()>data-url="${context.getRootPath(childMenu.getMenuUrl())}"</#if>>#{childMenu.getMenuName()}</li>
            </#for>
        </ul>
        </div>
<#elseif Validates.isNotEmptyBlank(topMenu.getMenuUrl())>
        <div class="single nav" onclick="Zin.doClickChildMenu(this, '${context.getRootPath(topMenu.getMenuUrl())}');" <#if context.getRootPath(topMenu.getMenuUrl()) == sessionUser.getMainUrl()>data-url="${context.getRootPath(topMenu.getMenuUrl())}"</#if>>#{topMenu.getMenuName()}</div>
</#if>
</#for>
    ${zhiqim_manager_topnav_left_defined()}
    </div>
    <div class="topnavright">
        ${zhiqim_manager_topnav_right_defined()}
        <div class="nav z-w80 z-text-center z-pointer" onclick="Zin.doClickChildMenu(this, '${context.getRootPath("/"+zhiqim_manager+"/profile.htm")}');"><img class="z-bd-rd50p z-w40 z-h40" src="${sessionUser.getAvatar50()}"></div>
        <div class="nav z-w100 z-text-center z-pointer" onclick="Zin.refreshIframeTabActive();">刷新</div>
        <div class="nav z-w100 z-text-center z-pointer" onclick="Z.L.confirm('${context.getRootPath("/"+zhiqim_manager+"/logout.htm")}', '确实要退出吗?');">退出系统</div>
    </div>
    <div id="topnaviframe" class="z-hidden-fixed"></div>
</div>

<!--容器开始 -->
<div id="container" class="container">

<!-- 框架导航 -->
<div id="iframenav" class="iframenav z-h40 z-lh40 z-bg-white z-bd-b">
    <div class="iframenav-prev" onclick="Zin.turnIframeTab(false);"><i class="z-font z-arrow-left"></i><i class="z-font z-arrow-left"></i></div>
    <div class="iframenav-tab-wrap">
    <ul class="iframenav-tab-list">
        <li class="iframenav-tab-item active" id="tab_menu_index" onclick="Zin.selectIframeTabEvent(event);"><span>首页</span></li>
    </ul>
    </div>
    <div class="iframenav-next" onclick="Zin.turnIframeTab(true);"><i class="z-font z-arrow-right"></i><i class="z-font z-arrow-right"></i></div>
    <div class="iframenav-ctrl">
        <div class="iframenav-ctrl-title" onclick="Zin.toggleIframeCtrlWrap();">关闭操作<i class="z-font z-arrow-down"></i></div>
        <div class="iframenav-ctrl-wrap">
        <ul>
            <li class="iframenav-ctrl-item" onclick="Zin.selectIframeTabActive();">定位当前选项卡</li>
        </ul>
        <ul>
            <li class="iframenav-ctrl-item" onclick="Zin.closeIframeTabAll();">关闭全部选项卡</li>
            <li class="iframenav-ctrl-item" onclick="Zin.closeIframeTabOther();">关闭其他选项卡</li>
        </ul>
        </div>
    </div>
</div>

<!--框架内容-->
<div id="mainbody" class="mainbody iframenav-cont z-h100p">
    <div id="iframe_menu_index" class="iframenav-cont-item active">
        <iframe id="mainFrame" name="mainFrame" frameborder="0" scrolling="auto" src="welcome.htm"></iframe>
    </div>
</div>

<!--容器结束 -->
</div>
</body>
</html>